ERROR -  The element 'MailboxSearchScope' in namespace has invalid child element 'ExtendedAttributes'

hi everyone,

i'm using exchange server 2013 and write following code for getting searchable mailboxes and getting emails from these searchable mailboxes but i'm getting following error on "SearchMailboxes" function.

Code:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);

        service.Credentials = new WebCredentials("example@example.com", "test123");

        service.AutodiscoverUrl("example@example.com", RedirectionUrlValidationCallback);

        GetSearchableMailboxesResponse gsMBResponse = service.GetSearchableMailboxes("example*", false);

        MailboxSearchScope[] msbScope1 = new MailboxSearchScope[gsMBResponse.SearchableMailboxes.Length];
        
        Int32 mbCount1 = 0;
        foreach (SearchableMailbox sbMailbox in gsMBResponse.SearchableMailboxes)
        {
            msbScope1[mbCount1] = new MailboxSearchScope(sbMailbox.ReferenceId, MailboxSearchLocation.PrimaryOnly);
            mbCount1++;
        }

        SearchMailboxesParameters smSearchMailbox1 = new SearchMailboxesParameters();
        MailboxQuery mbq1 = new MailboxQuery("attachment:'.xls'", msbScope1);
        MailboxQuery[] mbqa1 = new MailboxQuery[1] { mbq1 };
        smSearchMailbox1.SearchQueries = mbqa1;
        smSearchMailbox1.PageSize = 1000;
        smSearchMailbox1.ResultType = Microsoft.Exchange.WebServices.Data.SearchResultType.PreviewOnly;
        service.TraceEnabled = true;
        ServiceResponseCollection<SearchMailboxesResponse> srCol1 = service.SearchMailboxes(smSearchMailbox1);

ERROR:

The request failed schema validation: The element 'MailboxSearchScope' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has invalid child element 'ExtendedAttributes' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'."}

anyone have idea to solve this?

Thanks

April 8th, 2015 2:48am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics